package com.jucai.pppeiyouclient.view.dialog;

import android.content.Context;
import android.view.View;
import android.widget.TextView;

import com.jucai.pppeiyouclient.R;
import com.jucai.pppeiyouclient.base.BaseDialog;
import com.jucai.pppeiyouclient.comm.CommonMethod;

/**
 * Created by Kuky on 2017-04-25.
 */

public class PlayOrderYueDialog extends BaseDialog {
    private View dialogView;
    private TextView playOrderPriceTitle;
    private TextView cancleTv;

    public PlayOrderYueDialog(Context context) {
        super(context);
    }

    public PlayOrderYueDialog(Context context, int themeResId) {
        super(context, themeResId);
    }

    protected PlayOrderYueDialog(Context context, boolean cancelable, OnCancelListener cancelListener) {
        super(context, cancelable, cancelListener);
    }

    @Override
    protected View initView() {
        dialogView = CommonMethod.getView(context, R.layout.dialog_play_order_yue);
        playOrderPriceTitle = (TextView)dialogView.findViewById(R.id.play_dialog_price);
        cancleTv = (TextView)dialogView.findViewById(R.id.bind_success_cancel);
        cancleTv.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                dismiss();
            }
        });
        return dialogView;
    }

    public void setTitlePrice(Double price){
        playOrderPriceTitle.setText("确认支付" + price + "元");
        this.initView();
    }

    @Override
    public void setOnclickListener(View.OnClickListener listener) {
        dialogView.findViewById(R.id.bind_success_sure).setOnClickListener(listener);
    }
}
